<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
* {
	margin: 0;
	padding: 0;
}

.style6 {
	font: 12px 宋体;
	background-image: url(images/bili.jpg);
	background-repeat: no-repeat;
}
</style>

<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
	
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="css/index.css" type="text/css" rel="stylesheet" />
<!-- 最新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet"
	href="css/bootstrap.min.css">

<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet"
	href="css/bootstrap-theme.min.css">

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script
	src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->

</head>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">

	
					function check(id) {
							
							$.getJSON("getAllGenreByName",{id : id},
					  function(data) {
							var html = "";
							$.each(data,function(i,item) {
								$("#Hname").val(item["name"]);
								$("#Hphone").val(item["phone"]);
								$("#Hscope").val(item["scope"]);
								$("#Hid").val(item["id"]);
							})			
							
					   });
						
					}
</script>
<body>

	<!-- 
<div class="style0" style="border: 0px black solid;">
		<div class="style1" style="border: 0.5px blue solid;">
			<div class="style2">
				<h1>&nbsp;&nbsp;&nbsp;业主爱好</h1>
			</div>
			<div class="style3" style="border: 0px black solid;">
				<div style="text-indent: 50px;">
					<br />
					<p style="font-size: 20px;">当前用户:aaa</p>
					<br />
					<p>
						<a style="color: blue;">邮箱地址:www@ww</a>
					</p>
					<br /> <a style="text-indent: 20px; color: blue;">注销</a>
				</div>
			</div>
			<div class="style4"
				style="border: 0px black solid; padding: 15px; background-color: #87ceeb;">
				<span style="padding: 50px; color: white;">平台管理</span>
			</div>
			<div class="style5">
				<ul>
					<li class="Level1menu1">业主房屋管理</li>
					<li class="Level2menu1"
						style="display: none; background-color: #00FFFF;padding: 10px;">>小区列表</li>
						<li>小区管理</li>
					<li>权限管理</li>
					<li>家政管理</li>
					<li>编辑个人信息</li>
					<li>添加用户</li>
				</ul>
			</div>
		</div> -->



	<div style="background-color: #778899; padding: 11.5px;">
		<span style="">&nbsp;&nbsp;家政列表</span>
	</div>
	<div style="background-color: #F0F8FF;">
		<div style="padding: 60px;">
			<form action="PPhome">
				<table
					style="padding: 10px; background-color: #b0c4de; width: 1200px;">
					<tr>

						<td>关键字:<input type="text" name="name"><input
							type="submit" value="查询"></td>
					</tr>
				</table>

			</form>
			<table style="border: 1px black solid; padding: 10px; width: 1200px;">
				<tr style="border: 1px black solid;">
					<td>家政名称</td>
					<td>联系电话</td>
					<td>服务范围</td>
					<td>操作</td>
				</tr>
				<c:forEach var="list" items="${husbandriesList}">
					<tr>

						<td>${list.name }</td>
						<td>${list.phone }</td>
						<td>${list.scope }</td>
						<td><a href="PPcheckhome?id=${list.id }">查看详情</a>&nbsp;|&nbsp;
							<button onclick="check(${list.id})" data-toggle="modal"
								data-target="#myModal">修改</button>&nbsp;|&nbsp; <a
							href="deleteHusbandry?id=${list.id }">删除</a></td>
					</tr>
				</c:forEach>
			</table>
		</div>
	</div>

	<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">修改家政</h4>
				</div>
				<form action="updateHusbandry">
				<div class="modal-body">
					<table id="myDiv">
					    <tr>
					      <td><input type="hidden" id="Hid" name="Hid"/></td>
					    </tr>
						<tr>
							<td>家政名称</td>
							<td><input type="text" id="Hname" name="Hname" required="required"/></td>
							<td><br/></td>
						</tr>
						<tr>
							<td>联系电话</td>
							<td><input type="text" id="Hphone" name="Hphone" required="required"/></td>
						</tr>
						<tr>
							<td>服务范围</td>
							<td id=""><input type="text" id="Hscope" name="Hscope" required="required"/></td>
						</tr>
						<tr>
						   <td>选择服务小区：</td>
						   <td>
						   <select name="plotsId" required="required">
						      <c:forEach var="list" items="${plotsList}">
						          <option value="${list.id }">${list.name }</option>
						      </c:forEach>
						   </select>
						   </td>
						</tr>
					</table>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<input type="submit" class="btn btn-primary" value="保存"/>
				</div>
				</form>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->
</body>
</html>